Declare @Id Int                               
Select @Id = Id From sysobjects Where Name = 'Kalaid'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'TaxPercent')
  Alter Table Kalaid Add  TaxPercent REAL NOT NULL DEFAULT(0) 


Select @Id = Id From sysobjects Where Name = 'Kalaid'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'DiscountPercent')
  Alter Table Kalaid Add  DiscountPercent REAL NOT NULL DEFAULT(0) 

Select @Id = Id From sysobjects Where Name = 'Anbar'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'ProductionPrice')
  Alter Table Anbar Add  ProductionPrice MONEY NOT NULL DEFAULT(0) 

Select @Id = Id From sysobjects Where Name = 'History_price'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'ProductionPrice')
  Alter Table History_price Add  ProductionPrice MONEY NULL 

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TI_History_Price]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
Drop Trigger [dbo].[TI_History_Price]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TU_History_Price]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
Drop Trigger [dbo].[TU_History_Price]